package cn.jaye.fabric.common.constants.exception;

import cn.jaye.fabric.common.model.BaseException;

/**
 * @author Jaye
 * @create 2018-05-11 10:11
 */
public enum UserExceptionEnum implements BaseException {
    USER_FAILED(1021, "获取用户失败"),
    USER_ADMIN(1001, "必须为管理员用户"),
    USER_ERROR(1002, "用户不合法"),
    USER_REGISTER(1003, "用户已经被注册"),
    USER_PASSWORD_ERROR(1024, "用户名或密码错误");

    private Integer code;
    private String msg;

    UserExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

}
